#include <iostream>

using namespace std;

//cin:用于从键盘获取数据
int main() {
    //整型输入
    int a;
    cout << "请输入一个整数" << endl;
    cin >> a;
    cout << "a=" << a << endl;
    //浮点型输入
    float b;
    cout << "请输入一个浮点数" << endl;
    cin >> b;
    cout << "b=" << b << endl;
    //字符型输入
    char ch;
    cout << "请输入一个字符" << endl;
    cin >> ch;
    cout << "ch=" << ch << endl;
    //字符串型输入
    string str;
    cout << "请输入一个字符串" << endl;
    cin >> str;
    cout << "str=" << str << endl;
    //布尔类型
    bool flag;
    cout << "请输入布尔类型" << endl;
    cin >> flag;//bool类型只要是非0的值都代表真
    cout << "flag=" << flag << endl;
    return 0;
}

